% Plots impulse-response functions

set(0,'DefaultFigureWindowStyle','docked')  % docks all figures

linescolorGrid = {'gs-','ro-','b.-','k+-','mv-','y+-','c^-','ro-','gs-'};       

lc = linescolorGrid{par_.model};

ms = 5;

figure(100)

subplot(3,3,1)
hold on
switch par_.switch_shock
    case 'm'
        plot(scalefactor*(d_R_path),lc,'MarkerSize', ms)
    case 'A'
        plot(scalefactor*(d_A_path),lc,'MarkerSize', ms)
end
        xlim([1 20])
title('Shock process')
box off
legend('Woodford/Linear','GL07','CALVO')

subplot(3,3,2)
hold on
plot(scalefactor*(d_PI_path),lc,'MarkerSize',ms)
xlim([1 20])
title('Inflation')
box off

subplot(3,3,3)
hold on
plot(scalefactor*(d_C_path/Cbar),lc,'MarkerSize', ms)
xlim([1 20])
title('Consumption')
box off

subplot(3,3,4)
hold on
plot(scalefactor*(w_path/wbar-1),lc,'MarkerSize', ms)
xlim([1 20])
title('Real wage')
box off

subplot(3,3,5)
hold on
plot(scalefactor*ex_ante_real_interest_rate,lc,'MarkerSize', ms)
xlim([1 20])
title('Real interest rate')
box off

subplot(3,3,8)
hold on
plot(scalefactor*(cumsum(PI_path-mu)),lc,'MarkerSize',ms)
xlim([1 20])
title('Price level')
xlabel('Months')
box off

subplot(3,3,7)
hold on
plot(scalefactor*((w_path/wbar-1)+cumsum(PI_path-mu)),lc,'MarkerSize',ms)
xlim([1 20])
title('Nominal wage')
xlabel('Months')
box off

subplot(3,3,6)
hold on
plot(scalefactor*(d_delta_wedge),lc,'MarkerSize',ms)
xlim([1 20])
title('Productivity wedge')
xlabel('Months')
box off

subplot(3,3,9)
hold on
plot(scalefactor*(cumsum(mu_path-mu)),lc,'MarkerSize',ms)
xlim([1 20])
title('Nominal money')
xlabel('Months')
 box off

write_data;

% figure(101)
% plot(scalefactor*(cumsum(mu_path-mu))-(scalefactor*(cumsum(PI_path-mu)))+(scalefactor*(d_C_path/Cbar)))
% xlim([1 20])
% title('CIA (deviation)')
% xlabel('Months')
